package edu.sctu.practice.class02.shuqiqi.test11;

/**
 * Created by admin on 2015/10/18.
 */
public class MyTime1 {
    private int hour, minute, second;

    public MyTime1(int hour, int minute, int second) {
        this.hour = 3;
        this.minute = 39;
        this.second = 21;
    }

    public void diaplay() {
        System.out.println(" " + hour + "小时" + minute + "分钟" + second + "秒");
    }

    public void addSecond(int sec) {

    }

    public void addMinute(int min) {

    }

    public void addHour(int hou) {

    }

    public void subSecond(int sec) {
        second = second + sec;

    }

    public void subMinute(int min) {
        minute = minute + min;

    }

    public void subHour(int hou) {
        hour = hour + hou;
    }


    public static void main(String[] args) {
        MyTime1 myTime1 = new MyTime1(3, 39, 21);
        myTime1.subHour(4);
        myTime1.subMinute(16);
        myTime1.subSecond(33);
        myTime1.diaplay();

    }

}
